import tensorflow as tf
from numpy import shape

# random_float = tf.random.uniform(shape())

# 定义一个有2个元素的零向量
zero_vector = tf.zeros(shape=2)

# 定义两个2×2的常量矩阵
A = tf.constant([[1., 2.], [3., 4.]])
B = tf.constant([[5., 6.], [7., 8.]])

# 查看矩阵A的形状、类型和值
print(A.shape)  # 输出(2, 2)，即矩阵的长和宽均为2
print(A.dtype)  # 输出<dtype: 'float32'>
print(A.numpy())  # 输出[[1. 2.]
# [3. 4.]]
